use dta\Turnout_District_Level, clear 

sort year PR_district
drop _merge
merge year PR_district using dta\AlternativeMargin
drop if _merge==2 /* PR-districts not in sample */

/* OVERALL BOX AND WHISKER PLOT --- COMPETITITION */
replace margin=min_distance1 if year>1920
graph box margin, over(year) title("") ytitle("") graphregion(fcolor(white)) scheme(s2mono) legend(off)
*graph export figures\boxplot_margin.tif, replace
*graph export figures\boxplot_margin.eps, replace
graph export figures\Figure5.tif, replace
graph export figures\Figure5.eps, replace
